import request from "@/utils/request"

// 获取二级分类列表
export function getTopCategory(id) {
    return request({
        url: '/category?id=' + id,
        method: 'GET',
    })
}

// 获取二级分类数据
export function getCategoryFilter(id) {
    return request({
        url: `/category/sub/filter?id=${id}`,
        method: 'GET'
    })
}

// 获取二级分类商品列表
export function getSubCategory(data) {
    return request({
        url: '/category/goods/temporary',
        method: "POST",
        data
    })
}